import React from 'react'
import PropTypes from 'prop-types'

function ComponentName({ component: Component, ...rest }) {
  return (
    <Route {...rest} render={props => (
      fakeAuth.isAuthenticated ? (
        <Component {...props}/>
      ) : (
        <Redirect to={{
          pathname: '/login',
          state: { from: props.location }
        }}/>
      )
    )}/>
  )
}

ComponentName.propTypes = {

}

export default ComponentName
